<template>
    <div id="Environment" class="container-fluid">
        <div class="container">
            <h4>宿舍环境一览</h4>
            <hr/>

            <RotationChart
                componentType='dormitoryShow'
                :dormitoryData="dormitoryData"
            />
        </div>
    </div>
</template>

<script>
    // import Axios from 'axios'
    import RotationChart from '@/components/RotationChart.vue'

    export default {
        name: "Environment",
        components: {
            RotationChart
        },
        data() {
            return {
                dormitoryData: {
                    title: {
                        boxTitle: '宿舍信息',
                        littleTitle: '房间里又什么？有亲情、有温暖、有欢乐……满满的都是美好的回忆。' +
                            '每一句闲谈都是最温情的关于家的记忆。'
                    },
                    RotationChartList: [
                        { key: 0, imgSrc: require('@/assets/images/ro1.png'), imgTitle: '', imgContent: '' },
                        { key: 1, imgSrc: require('@/assets/images/ro2.png'), imgTitle: '', imgContent: '' },
                        { key: 2, imgSrc: require('@/assets/images/ro3.png'), imgTitle: '', imgContent: '' },
                        { key: 3, imgSrc: require('@/assets/images/ro4.png'), imgTitle: '', imgContent: '' },
                    ],
                    dormitoryShowDataList: [
                        { key: 0, itemTitle: '宿舍索引', content: '紫晶城小区01栋3单元402室' },
                        { key: 1, itemTitle: '宿舍地址', content: '江西省南昌市经开区枫林大道336号' },
                        { key: 2, itemTitle: '宿舍面积', content: '42.43M²' },
                        { key: 3, itemTitle: '宿舍铺位', content: '4位' },
                    ],
                }
            }
        },
        created: function () {
            // 获取远程数据
            // Axios.post(
            //     'XXXXXXX',
            //     {},
            // ).then(resp => {
            //     if (resp.status === 200 && resp.data) {
            //         console.log(resp.data)
            //     } else {
            //         console.log('连接参数为：' + resp.status)
            //     }
            // }).catch(err => {
            //     console.log('请求失败：' + err.status + ',' + err.statusText)
            // })
        }
    }
</script>

<style scoped>
    #Environment{
        padding-top: 35px;
        padding-bottom: 35px;
        background-color: #eeeeee;
    }
</style>
